import { useAppSelector } from "app/redux/hooks"

const MakeLocationData = () => {
  const appointmentState = useAppSelector((state) => state?.createAppointment)

  const DATA = [
    {
      title: "ETHERA LOCATIONS",
      checkLength: appointmentState?.EtheraLocations?.length !== 0 ? true : false,
      data: appointmentState?.EtheraLocations?.map((element) => {
        return {
          ...element,
          type: "ethera",
        }
      }),
    },
    {
      title: "OTHER LOCATIONS",
      checkLength: appointmentState?.OtherLocations?.length !== 0 ? true : false,
      data: appointmentState?.OtherLocations?.map((element) => {
        return {
          ...element,
          type: "other",
        }
      }),
    },
  ]

 return DATA
}

export default MakeLocationData
